<template>
  <div class="home">
    <div class="homeNavBar">
      <nav-bar>
        <div slot="left">头像</div>
        <div slot="center">搜索</div>
        <div slot="right">消息</div>
      </nav-bar>
    </div>
    这是首页
    <div>
      <button @click="test">测试按钮</button>
    </div>
  </div>
</template>

<script>
  // @ is an alias to /src
  import navBar from "@/components/common/navBar/Nav-bar"
  import {test} from "@/api/Home/home.js"
  export default {
    name: 'Home',
    components: {navBar},
    methods:{
      test(){
        const testParam = {hello:'hello'}
        test(testParam).then(res =>{
          console.log(res)
        })
      }
    }
  }
</script>
<style scoped>
  .homeNavBar {
    background: #ff5777;
  }
</style>
